home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
games
/
egavga
/
ginrummy.arj
/
GINRUMMY.DOC
< prev
next >
Wrap
Text File
|
1992-01-14
|
23KB
|
497 lines
===================
GinRummy
from
Universal Software
-------------------
Copyright 1991
by
David Teach
-------------------
Version 3.0
===================
Requirements / Recommendations to play
======================================
An EGA or VGA graphics card with at least 256k is required.
A Microsoft, Logitech, or compatible mouse is recommended.
Three button rodents work better for the hint feature.
An IBM or compatible AT computer with 8 mHz or faster
CPU speed is also recommended.
Rules of the Game - Taken from "Official Rules of Card Games",
================= 62nd edition, U.S Playing Card Company, 1968
Rank of cards:
(High) K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2, A.
Value of cards:
Face cards 10, Ace 1, other cards their pip value.
The Deal:
Each player is dealt 10 cards, the next card is turned face
up, forming the discard pile. The rest of the deck is placed
beside it, face down.
Object of play:
To form MATCHED SETS, consisting of three or four of a kind,
or sequences of three or more cards of the same consecutive rank
in the same suit.
The Play:
The human player and the computer take turns by drawing a
card from either the deck or the top of the discard pile, then
choosing a card from their hand to discard. In this game, you
always go first. Players alternate until:
1) A player can GIN.
2) A player KNOCKS.
3) Only 2 cards are left in the deck.
A Draw:
If only two cards remain in the deck at the start of a turn,
a player may choose a card from the discard pile and continue his
turn; but if either player draws from the deck, the hand is a draw.
No points are scored for a draw hand, the cards are re-shuffled
and dealt again for a new hand.
The number of cards left in the deck is shown as a small
white number on the top of the deck. If the number or cards left
is 7 or lower, the number on the deck will be red instead of white.
GIN:
If after discarding, all of the remaining cards in the
player's hand are formed into matched sets, the player has GIN.
This scores 25 points, plus the value of his opponent's unmatched
cards (deadwood).
KNOCK:
A player can KNOCK if, after discarding, the total of his
unmatched cards is 10 points or less. He does not have to knock
when able to do so. After knocking, the hand is over, and both
players count the points of their unmatched (deadwood) cards.
The other player (non-knocking) does not count the points of any
deadwood card he can play on the knocking player's MATCHED SETS.
This is called LAYING OFF. The knocking player CANNOT lay off any
of his deadwood cards, and the player laying off CANNOT alter his
or his opponent's matched sets in order to lay off more cards, or
combine his and the other player's deadwood cards to form matched
sets. If, after laying off, the knocking player has FEWER points
than his opponent, he scores the difference in points. If the
non-knocking player has LESS or MORE points than his opponent, he
has UNDERCUT him and scores 25 points, plus the point difference
in unmatched cards. (If you can't remember all this, don't worry;
the computer does all the laying-off and counting for you.)
OKLAHOMA:
If the Oklahoma option is on, play is the same except that
the value of the first card on the discard pile (the upcard),
determines the knock value, whether it is taken or not. That
means, if the first upcard is a 5, then the players can only knock
if they have 5 points or less in deadwood cards. If an ACE is the
first upcard, a player must GIN to win the hand. If the first
upcard is a SPADE, all points scored in that hand are DOUBLED.
To remind you if this, a RED box will be drawn around the knock
card when the first upcard is a spade.
Winning:
Play continues until a player's accumulated score is greater
or equal to the agreed scoring limit, usually 100. You can then
quit the game or play a new game from zero.
How to play this computer game
==============================
When in keyboard play, the numbers or letters for the commands are
highlighted in light green. When using the mouse, commands are
selected with either the Left or Right mouse buttons. The center
button or both left and right buttons together will ask for a hint.
When using the keyboard, the letter H brings up the hint suggestion.
WARNING: if you are using both left and right mouse buttons to ask
for hints, you must make sure that the mouse pointer is NOT OVER
a regular choice area, (deck, card in hand, quit, etc.) or else
the game will usually think that you made a normal choice with a
single button. If you have a center button, use that instead; this
will work for hints ANYWHERE on the screen, even over normal choice
areas.
***** Note *****
The keyboard commands are only possible if a mouse is not detected,
or if you are in forced keyboard mode; otherwise, the mouse is the
default selecting device.
The Title Screen:
BEGIN GAME -
Typing 'B' or clicking the left or right mouse button on
the BEGIN GAME box starts the game with the shown options.
Hitting ENTER will also choose this.
OPTIONS -
Typing 'O' or clicking on OPTIONS will bring up the game
Options Menu. (see below)
HIGH SCORES -
This displays the top 20 high scores list.
QUIT -
QUIT will exit the program.
The Options Menu:
MAIN MENU -
This option will bring you back to the main menu. (Title screen)
You can hit the letter M, the ENTER key, or ESCAPE key to
select this in keyboard mode.
NAME -
The default name is 'PLAYER'. You can change this by typing 'N'
or clicking the mouse pointer within the red box around the name,
typing a new name, and pressing ENTER (or a mouse button).
Backspace is the only editing key allowed if you make an error
while typing in the name. Upper and lower case letters, numbers
1 through 9, characters ! . , " - : / ?, and spaces are also
allowed. The name can be a maximum of 8 characters long.
SORT BY -
This toggles the sorting of the unmatched cards in your hand:
RANK = Unmatched cards are arranged highest to lowest, regardless
of suit. Cards of same value are then arranged by suit.
SUIT = Unmatched cards are arranged highest to lowest within
the four possible suits. Suit order is: Spades, Hearts,
Diamonds, Clubs. (Bridge order)
SCORE LIMIT -
Clicking on SCORE LIMIT cycles the maximum score to play to
by 50 points, from 0 to 500. Or by 50 points added on to,
or subtracted from, any command line score limit you give.
The RIGHT mouse button, or '+' INCREASES the score by 50, and
the LEFT mouse button, or '-' DECREASES the score by 50.
OKLAHOMA -
Changing the OKLAHOMA option to YES will play the game by
Oklahoma rules. (see rules above) The double points on
a spade as first upcard is still in effect even if knocking
is disabled.
BIG CARDS -
The default card set has somewhat realistic-looking cards,
but it can be a little hard to distinguish between the suits
on some video cards. Changing this option to YES will give you
cards with one big number and one big symbol for the suit.
If the shapes of the suits do not look good to you, it is the
fault of your computer's built in default character set. I
improved on the Diamond, but the other suits are too complicated
for quick drawing and filling. (maybe a later fix)
EASY GAME -
If the computer is too hard for you, toggle EASY to YES. This
will make the computer always pick the largest value unused
card in his hand for discarding instead of following its better
choosing formulas.
KNOCKING -
If this option is YES, you are allowed to knock if possible.
(See knock rules above) Otherwise you must GIN to win a hand.
If knocking is disabled, a zero will be drawn for the knock
card value instead of the normal knock value.
POINTER -
Clicking on this option will change the shape of the mouse
pointer. There are seven different shapes to choose from.
Obviously, this will not have any effect if the mouse driver
is disabled or not present.
SAVE -
Selecting SAVE will save all options to the GINRUMMY.CFG file.
This file is loaded when the program is run, so your name and
favorite options are already set. If this file is not present,
or is corrupted, it will be created with the default options.
Command Line Options:
The default setting for the two options NAME and SCORE LIMIT
can be set from the command line, overriding the configuration file
settings. At the DOS prompt, you can do the following:
To set the SCORE LIMIT: GINRUMMY <nnn> -- where <nnn> is a number
from 000 to 999. ex. GINRUMMY 234
For numbers less than 100, you MUST use leading zeros. ex. 025
If the limit is 0, then exactly one hand will be played, even if
it is a draw.
To have the game use your name instead of the default name, you
can state it as a command line option. ex. GINRUMMY Dave
For the Command line option of Player Name, the length limit is 8
characters and the name must be one word. You can use BobSmith,
or Ron_Hill, etc., but typing Paul Schoenberger will give you
Schoenbe for your name. If you want a space in your name, you
can put one in only with the Name Change from the options menu.
The name used is the LAST word on the command line that is NOT
otherwise recognized as a command, so be sure not to have any
gibberish on the line when you start the game:
GINRUMMY Mike ASDF will make your name ASDF not Mike.
To force the game to play in keyboard mode when a mouse is detected,
use the command line option KEYBOARD to enable keyboard play.
*** Be careful of mixing keyboard and mouse play. Since this
game will automaticly select keyboard mode if a mouse is not
detected, this option should only be used if a mouse is falsely
detected on your computer, or you can't turn off your mouse and
you need to play using the keyboard. ***
To go directly into the game, bypassing the intro screen, use
the command GO from the DOS prompt. ex. GINRUMMY ok JOHN go
Since the game looks only at the first four parameters, too much
garbage on the command line might miss a legitimate option:
GINRUMMY 1 2 3 4 GO will NOT execute the GO command.
These options can be put in any order and are all case insensitive
except for the Player Name.
Game Play:
To start play, a player must draw a card from either the
Deck or the Discard pile. To do this, click the mouse pointer on
the deck or on the discard pile on the playing screen, OR click
on the words DECK or DISCARD PILE in the red boxes at the bottom
of the screen. In keyboard mode, type the highlighted letters 'D'
for DECK, or 'P' for DISCARD PILE to choose.
You then must choose a card to discard. Click the mouse
pointer on the card in your hand that you want to discard
(the card you want to replace with your drawn card). To do this
in keyboard mode, the numbers 1 2 3 4 5 6 7 8 9 0 appear under
your hand. Choose the number under the card you want to discard,
or you can discard the drawn card by clicking on the discard pile,
on the words DRAWN CARD in the red box at the bottom of the screen,
or type 'D' in keyboard mode. If the drawn card is taken from the
discard pile, you can undo the draw by clicking on the card drawn,
or within box around UNDO, or by typing 'U' on the keyboard.
After you discard, the computer will draw and discard.
Play continues until one of you gins, knocks, or draws the last
card in the deck. You can also type 'Q' or click on the QUIT
option in a red box at the bottom right of the screen to return,
upon confirmation, to the title screen. Double-clicking on the
QUIT option will also send you to the title screen.
If after you discard, the total points remaining in your
hand are equal to or less than the knock value, you will be asked
if you want to knock. Click on YES, or on the knock card, to end
the game with a knock. Click on NO, or on the discard pile, to
continue the game without knocking. Keyboard mode highlights
the 'Y' and 'N' for choosing yes or no. If you have disabled
knocking, this question will not appear.
After one of you wins a hand, scores are accumulated until
reaching the limit set at the title screen, whereupon one of you
wins the game. You can then play again from zero or quit to the
main intro menu.
The Color Bars -
To help you see how your cards are arranged, the computer
will draw colored bars above your matched cards. The computer
sorts the cards in your hand into the arrangement that gives you
the lowest deadwood score (or it tries to). Above all cards in
your hand that are matched into sets of 3 or 4 of a kind, a BLUE
bar will be drawn. Above the cards matched into a run will be
drawn a GREEN bar.
If the COMPUTER player draws from the discard pile instead
of the deck, a RED bar will be put over the discard pile until
the next turn. This means that the computer took the card that
you just discarded. Since the computer goes so fast, this is done
to simulate a more realistic play in which you can see from where
your opponent draws.
Also, if a player Knocks, and the other player can lay off
some deadwood on the knocking player, a RED bar will be drawn
over (or under) all the laid off cards.
When you choose for the computer to give you a hint on
drawing a card or when choosing a discard, a YELLOW bar will be
placed over the recommended place.
The Score file -
At the end of each game, the program checks for a score file
called GINRUMMY.SCR in the current directory. If it is not there,
it is created. This file saves your 20 best average scores (the
final score divided by the number of hands played). Also saved
is your name (you must use the command line name option, or change
the default player name if you don't want 'PLAYER' saved as your
name), the final score, the score limit, the number of hands played,
whether the Oklahoma option is on or off (Y or N), and the date the
game was played. Scores are not saved for the Computer player.
If your score file is corrupted, or you just want to clear the
score list and start over, erase (or rename) the GINRUMMY.SCR file.
******* If you quit a hand before the END of the game, the score
file will NOT be updated. ********
Notes on the Computer player -
The comnputer does NOT "cheat" when playing. It does not
look at the deck before choosing to draw, it does not look at
your hand, or do any other thing that a human player cannot do.
In fact, it is much more limited than a human player in that it
does NOT remember any cards that have already been buried in the
discard pile when trying to choose a discard. Also, the computer
chooses its discard by a set of fixed formulas that do not have
any room for human "intuition" or for many of the different
possible arrangements of the hand that might make a good human
player choose a diffent discard than the computer.
The "Hint" function uses about the same formulas for choosing
a discard that the computer uses for its moves.
IF YOU HAVE A THREE BUTTON MOUSE, BUT THE CENTER BUTTON DOES NOT
DO ANYTHING, you probably are using a different mouse driver than
the one which came with your mouse. A three button mouse MUST be
driven by a three button mouse driver (like Logitech). Most of
the Microsoft mouse driver programs are for two button rodents.
They seem to work fine for all operations of the mouse except for
the center button. If you have a problem, look around the BBS's
for a newer mouse driver, (I use Logitech mouse driver ver. 6.00)
or contact the company where you purchased your mouse.
==================================================================
This program is written in Turbo Pascal Version 6.0
The Mouse unit is from the book "Turbo Pascal Advanced Programer's
Guide" by Stephen K. O'Brian. This unit was slightly modified by me.
Feel free to upload and share this shareware program with everyone.
Please call me if you have any questions, comments, improvements,
or find any bugs.
David Teach - Phone: (813) 968-5986 CompuServe ID: 70743,2753
==================================================================
Version History:
Ver 3.0 - 01/14/92 - (Enhancements for widespread release)
- added hints button/key for tips on drawing and discarding.
- now supports monochrome EGA and VGA graphics.
- you can now undo an accidental draw from the discard pile.
- improved the computer's drawing/discarding choice routines.
- replaced non-working help with high scores box on main screen.
- increased saved high scores from 10 to 20.
- you can now view the high scores from within the program,
instead of only when exiting.
- changing the mouse pointer shape is now done from the
options menu.
- fixed a minor bug that gave the wrong ranking when creating
a new high score file.
- fixed some bugs when sorting cards in a certain arrangements.
Ver 2.4 - 10/07/91 - (More options to choose from)
- uncluttered the title screen by adding an Options Menu.
- you can now save (almost) all of the game options to disk.
- changed to new mouse driver unit for better mouse function.
- there are now 7 different mouse cursors to choose from.
- unsorted cards can be in either Rank or Suit order.
- knocking can be disabled. (play until Gin)
- put cards of same value, when sorting by rank, into bridge
suit order: spades, hearts, diamonds, and clubs.
- fixed a bug in card sorting that would not take a card
off of the end of a run when there was a match possible
with two unused cards.
Ver 2.3 - 05/07/91 - (A few enhancements and bug fixes)
- changed the single color bars to a solid bar over the
entire run or set, to help disinguish each set.
- added a cursor when changing your name from main menu.
- better working when mouse and keyboard are both active.
- fixed a bug that put a green bar insead of a blue bar
over 4 of a kind sets.
- fixed a VGA to EGA conversion bug that did not draw the
red bar over the discard pile when computer picked
from it.
- fixed a bug where you sometimes could not exit the game
after pressing a few keyboard keys when in mouse mode.
- fixed a minor bug when double-clicking the quit box.
- GinRummy is now Copyrighted 1991.
Ver 2.2 - 04/26/91 - (EGA, keyboard, easy, keyboard options)
- only an EGA or better video card is now required.
- GinRummy can now be played using either the mouse or
the keyboard.
- added the KEYBOARD option for false mouse detection.
- added the option for an EASY computer player for wimps.
- changed the KNOCK card and the QUIT box displays.
- put a red box on the knock card when it is a spade and
the Oklahoma option is active.
Ver 2.1 - 03/24/91 - (A quick bug fix, some improvements)
- added a counter on the screen for number of hands played.
- when changing the score limit from the intro screen, the
left and right mouse buttons now decrease or increase
the score limit. (respectively)
- fixed bug when printing scores over 999.
- fixed a bug in the number of hands counter when quitting
to the intro screen, and then beginning another game.
(Discovered about 20 minutes after releasing Ver 2.0)
- more room allocated on the stack for recursive procedure
calling, (say what?) to eliminate occasional hangs.
- misc. code streamlining for faster play.
Ver 2.0 - 03/22/91 - (Bug fix, Name, Stats, Harder Opponent)
- made the computer player much smarter at discarding.
Having the computer choose better when discarding, you
now face a MUCH tougher opponent than before.
- added a score file to save ten best average game scores.
- can now input/change player's name in main menu.
- can now use left or right buttons to play.
- improved the card sorting and hand ordering for both players.
- now shows the points scored when undercutting.
- improved the BIG cards appearance. (Diamonds at least)
- fixed a major bug in the Oklahoma option scoring that occurs
when drawing the first card of the discard pile if it is a
spade and the discard is not, or vise versa. (Thanks Kevin)
- fixed a bug that incorectly counted the score when laying
of a face card.
- fixed a bug where the game would not end if a player's
score was exactly the same as the game score limit.
- fixed a bug that would not correctly lay off cards if the
knocking player had two or more consecutive runs.
- did a general playability refinement, and many misc changes.
Ver 1.2 - 02/01/91 - (A few needed options for better play.)
- added the GO command line option.
- added the counter of cards left in deck.
- added option for the player's name.
- shows the score limit during play.
Ver 1.1 - 01/19/91 - (Requested by Paul Schoenberger of
the Clearwater IBM Users Group, Board of Directors.)
- added the option for big cards.
- added command line options.
- added version number for future releases.
First Uploaded Release (no version number) - 12/03/90
- fixed a bug in the discard pile.
- minor playing changes.
USF Engineering Technology Senior Project - 08/05/90 (Grade: A)
- first playable version.